package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.ruoyi.system.mapper.SysTempMenuMapper;
import com.ruoyi.system.domain.SysTempMenu;
import com.ruoyi.system.service.ISysTempMenuService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import org.apache.commons.lang.StringUtils;
/**
 * 系统模板菜单Service业务层处理
 * 
 * @author Ele
 * @date 2021-02-04
 */
@Service
public class SysTempMenuServiceImpl extends ServiceImpl<SysTempMenuMapper,SysTempMenu> implements ISysTempMenuService {

    @Override
    public List<SysTempMenu> queryList(SysTempMenu sysTempMenu) {
        LambdaQueryWrapper<SysTempMenu> lqw = Wrappers.lambdaQuery();
                                                                                if (StringUtils.isNotBlank(sysTempMenu.getTempId())){
                        lqw.eq(SysTempMenu::getTempId ,sysTempMenu.getTempId());
                    }
                                                                                                                                if (sysTempMenu.getMenuId() != null){
                        lqw.eq(SysTempMenu::getMenuId ,sysTempMenu.getMenuId());
                    }
                                                                return this.list(lqw);
    }




    }
